﻿namespace NJQuery {
	using System.Web.UI;
	using System.Web.UI.WebControls;
	using System.ComponentModel;

	/// <summary>
	/// Base server control used to remove <see cref="WebControl"/> property functionality that is not compatible with the <see href="http://jqueryui.com/demos/dialog/">jQuery UI Dialog widget</see>.
	/// </summary>
	public abstract class DialogFoundation : ManagedWebControl {


		#region Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="DialogFoundation"/> class.
		/// </summary>
		protected DialogFoundation() : base(HtmlTextWriterTag.Div) { }

		#endregion


		#region Properties: Not compatible with widget

		/// <summary>
		/// Gets or sets the text displayed with the mouse pointer hovers over the Web server control.
		/// This property is ignored for the jQuery UI <see cref="Dialog"/> widget.
		/// </summary>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public override string ToolTip {
			get { return string.Empty; }
			set { }
		}

		/// <summary>
		/// Gets or sets the width of the Web server control.
		/// This property is ignored for the jQuery UI <see cref="Dialog"/> widget.
		/// </summary>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public override Unit Width {
			get { return Unit.Empty; }
			set { }
		}

		/// <summary>
		/// Gets or sets the height of the Web server control.
		/// This property is ignored for the jQuery UI <see cref="Dialog"/> widget.
		/// </summary>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public override Unit Height {
			get { return Unit.Empty; }
			set { }
		}

		#endregion


		#region Methods: Not compatible with widget

		/// <summary>
		/// Sets input focus to a control.
		/// This method is ignored for the jQuery UI <see cref="Dialog"/> widget.
		/// </summary>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public override void Focus() { }

		#endregion


	}

}